package com.gitee.jnxj.nraft.election;

import com.gitee.jnxj.nraft.common.core.*;
import com.gitee.jnxj.nrpc.spring.boot.autoconfigure.annotation.NRpcService;
import org.example.nrpc.common.listener.RpcCompletableFuture;

/**
 * @author 江南小俊
 * @since 2021/7/13
 **/
@NRpcService
public interface RaftService {
    RpcCompletableFuture<Boolean> requestVote(VoteReq voteParam);

    RpcCompletableFuture<HeartbeatResp> heartbeat(HeartbeatReq heartbeatParam);

    RpcCompletableFuture<AppendEntriesResp> appendEntries(AppendEntriesReq appendEntriesReq);
}
